package cn.house.entity;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * 街道表
 * 
 * @author Administrator
 *
 */
@Entity
@Table(name = "district") // 表
public class District implements Serializable {

	@Id
	private Integer id;

	private String name;

	@OneToMany(mappedBy = "district", fetch = FetchType.EAGER)
	private List<Street> streetList;

	public List<Street> getStreetList() {
		return streetList;
	}

	public void setStreetList(List<Street> streetList) {
		this.streetList = streetList;
	}

	public District() {
		super();
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
}
